package com.cn.wanxi.dao.impl;

import com.cn.wanxi.dao.NewsPlateDao;
import com.cn.wanxi.model.NewsPlateModel;
import com.cn.wanxi.util.GetSqlSession;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * 调用mybatis
 */
public class NewsPlateImpl implements NewsPlateDao {
    @Override
    public List<NewsPlateModel> findAll() {
        SqlSession sqlSession = GetSqlSession.getSqlSession();//连接数据库
        List<NewsPlateModel> list = sqlSession.selectList("com.cn.wanxi.dao.NewsPlateDao.findAll");
        GetSqlSession.commit();
        return list;
    }
}
